MyGame.s0 = function(game) {
	
	

};


MyGame.s0.prototype = {
    create: function() {

    	console.log('s0-door')

        game.door = game.add.image(0,0,'door-1');
        var i = 1;

        game.time.events.loop(Phaser.Timer.SECOND/12, function(){
            if(i>=20){
                game.state.start('s1')
                return;
            }
            i++
            game.door.loadTexture('door-'+i+'', 0, false);
        }, this);
    

    },
    update: function() {
    	
    	
    	
    },
    
    
    
    render : function(){
    	/*game.obstacles.forEach(function(item){
            game.debug.body(item);
        })
    	game.debug.body(game.player);*/
    }
};

